$OpenBSD: patch-src_pngwrite_c,v 1.1 2012/08/18 23:35:30 avsm Exp $

Fix build with png-1.5.

--- src/pngwrite.c.orig	Wed Jul  6 12:23:50 2011
+++ src/pngwrite.c	Wed Jul  6 12:24:20 2011
@@ -62,7 +62,7 @@ value write_png_file_rgb( name, buffer, width, height,
   }
 
   /* error handling */
-  if (setjmp(png_ptr->jmpbuf)) {
+  if (setjmp(png_jmpbuf(png_ptr))) {
     /* Free all of the memory associated with the png_ptr and info_ptr */
     png_destroy_write_struct(&png_ptr, &info_ptr);
     fclose(fp);
@@ -171,7 +171,7 @@ value write_png_file_index( name, buffer, cmap, width,
   }
 
   /* error handling */
-  if (setjmp(png_ptr->jmpbuf)) {
+  if (setjmp(png_jmpbuf(png_ptr))) {
     /* Free all of the memory associated with the png_ptr and info_ptr */
     png_destroy_write_struct(&png_ptr, &info_ptr);
     fclose(fp);
